<html>
<body>
<script type="text/javascript">
var an = 1;
var anp1 = 2;
var sum = 2;
do{
	var temp = anp1;
	anp1 = an + anp1;
	an = temp;
	if((anp1 % 2) === 0)
	{
		sum = sum + anp1;
	}

}while(anp1 < 4000000);
document.write(sum);
</script>
</body>
</html>